import React, { Component } from 'react';
import '../store/stores';
import {Provider} from 'mobx-react';
import {hotRehydrate, rehydrate} from 'rfx-core';
import {useStrict} from 'mobx';
import {isProduction} from '../utils/constants';
const store = rehydrate();

useStrict(true) // 不允许在动作之外进行状态修改
import route from '../route';
import { HashRouter as Router } from 'react-router-dom';

export default class Root extends Component {
  render() {
    return (
      <Provider store={isProduction ? store : hotRehydrate()}>
        <Router children={this.route}/>
      </Provider>
    );
  }
}
